package com.aspose.cells.a.d;

import com.aspose.cells.Color;
import java.util.ArrayList;

public class zab {
   public static ArrayList a(Color var0, Color var1, com.aspose.cells.b.a.b.zq var2, int var3, int var4) {
      ArrayList var5 = new ArrayList();
      if (var2.h() != 0.0F && var2.i() != 0.0F) {
         zg var6 = null;
         zn var7 = null;
         com.aspose.cells.b.a.b.zo var9;
         com.aspose.cells.b.a.b.zo var10;
         com.aspose.cells.b.a.b.zo var11;
         com.aspose.cells.b.a.b.zo var12;
         double var13;
         float var15;
         float var16;
         switch(var3) {
         case 0:
            switch(var4) {
            case 1:
               var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.l(), var2.k()), new com.aspose.cells.b.a.b.zo(var2.l(), var2.m()), var0, var1, 1.0F);
               var7 = zn.b(var2);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            case 2:
               var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.j(), var2.m()), new com.aspose.cells.b.a.b.zo(var2.l(), var2.k()), var0, var1, 1.0F);
               var7 = zn.b(var2);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            case 3:
               var13 = Math.atan2((double)var2.i(), (double)var2.h());
               var15 = (float)((double)var2.h() * Math.sin(var13) * Math.sin(var13));
               var16 = (float)((double)var15 * Math.tan(var13));
               var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.l(), var2.k()), new com.aspose.cells.b.a.b.zo(var2.l() - var15, var2.m() - var16), var0, var1, 1.0F);
               var7 = zn.a(var2.d(), new com.aspose.cells.b.a.b.zo(var2.l(), var2.k()), new com.aspose.cells.b.a.b.zo(var2.l(), var2.m()));
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               var7 = zn.a(new com.aspose.cells.b.a.b.zo(var2.l(), var2.m()), new com.aspose.cells.b.a.b.zo(var2.j(), var2.k()));
               var7.a = new zs(var1);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.j(), var2.m()), new com.aspose.cells.b.a.b.zo(var2.j() + var15, var2.k() + var16), var0, var1, 1.0F);
               var7 = zn.a(new com.aspose.cells.b.a.b.zo(var2.l(), var2.m()), new com.aspose.cells.b.a.b.zo(var2.j(), var2.m()), var2.d());
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            default:
               return var5;
            }
         case 1:
            switch(var4) {
            case 1:
               var6 = new zg(var2.d(), new com.aspose.cells.b.a.b.zo(var2.l(), var2.m()), var0, var1, 1.0F);
               var7 = zn.b(var2);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            case 2:
               var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.l(), var2.m()), var2.d(), var0, var1, 1.0F);
               var7 = zn.b(var2);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            case 3:
               var13 = Math.atan2((double)var2.i(), (double)var2.h());
               var15 = (float)((double)var2.h() * Math.sin(var13) * Math.sin(var13));
               var16 = (float)((double)var15 * Math.tan(var13));
               var6 = new zg(var2.d(), new com.aspose.cells.b.a.b.zo(var2.j() + var15, var2.m() - var16), var0, var1, 1.0F);
               var7 = zn.a(var2.d(), new com.aspose.cells.b.a.b.zo(var2.l(), var2.k()), new com.aspose.cells.b.a.b.zo(var2.j(), var2.m()));
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               var7 = zn.a(new com.aspose.cells.b.a.b.zo(var2.j(), var2.m()), new com.aspose.cells.b.a.b.zo(var2.l(), var2.k()));
               var7.a = new zs(var1);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.l(), var2.m()), new com.aspose.cells.b.a.b.zo(var2.l() - var15, var2.k() + var16), var0, var1, 1.0F);
               var7 = zn.a(new com.aspose.cells.b.a.b.zo(var2.l(), var2.m()), new com.aspose.cells.b.a.b.zo(var2.l(), var2.k()), new com.aspose.cells.b.a.b.zo(var2.j(), var2.m()));
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            default:
               return var5;
            }
         case 2:
            com.aspose.cells.b.a.b.zo var8 = new com.aspose.cells.b.a.b.zo((var2.j() + var2.l()) / 2.0F, (var2.k() + var2.m()) / 2.0F);
            var9 = new com.aspose.cells.b.a.b.zo(var2.j(), var2.k());
            var10 = new com.aspose.cells.b.a.b.zo(var2.l(), var2.k());
            var11 = new com.aspose.cells.b.a.b.zo(var2.l(), var2.m());
            var12 = new com.aspose.cells.b.a.b.zo(var2.j(), var2.m());
            var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.j(), var2.k()), new com.aspose.cells.b.a.b.zo(var8.d(), var2.k()), var1, var0, 1.0F);
            var7 = zn.a(var9, var8, var12);
            var7.a((com.aspose.cells.b.a.b.zc)var6);
            com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
            var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.j(), var2.k()), new com.aspose.cells.b.a.b.zo(var2.j(), var8.e()), var1, var0, 1.0F);
            var7 = zn.a(var9, var8, var10);
            var7.a((com.aspose.cells.b.a.b.zc)var6);
            com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
            var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.l(), var2.k()), new com.aspose.cells.b.a.b.zo(var8.d(), var2.k()), var1, var0, 1.0F);
            var7 = zn.a(var10, var8, var11);
            var7.a((com.aspose.cells.b.a.b.zc)var6);
            com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
            var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.l(), var2.m()), new com.aspose.cells.b.a.b.zo(var2.l(), var8.e()), var1, var0, 1.0F);
            var7 = zn.a(var11, var8, var12);
            var7.a((com.aspose.cells.b.a.b.zc)var6);
            com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
            break;
         case 3:
            var9 = new com.aspose.cells.b.a.b.zo(var2.j(), var2.k());
            var10 = new com.aspose.cells.b.a.b.zo(var2.l(), var2.k());
            var11 = new com.aspose.cells.b.a.b.zo(var2.l(), var2.m());
            var12 = new com.aspose.cells.b.a.b.zo(var2.j(), var2.m());
            switch(var4) {
            case 1:
               var6 = new zg(var9, var10, var0, var1, 1.0F);
               var7 = zn.a(var9, var10, var11);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               var6 = new zg(var9, var12, var0, var1, 1.0F);
               var7 = zn.a(var9, var12, var11);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            case 2:
               var6 = new zg(var9, var10, var1, var0, 1.0F);
               var7 = zn.a(var9, var10, var12);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               var6 = new zg(var9, var12, var0, var1, 1.0F);
               var7 = zn.a(var10, var12, var11);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            case 3:
               var6 = new zg(var12, var9, var0, var1, 1.0F);
               var7 = zn.a(var9, var10, var12);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               var6 = new zg(var12, var11, var0, var1, 1.0F);
               var7 = zn.a(var10, var12, var11);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            case 4:
               var6 = new zg(var10, var11, var1, var0, 1.0F);
               var7 = zn.a(var9, var10, var11);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               var6 = new zg(var12, var11, var1, var0, 1.0F);
               var7 = zn.a(var9, var12, var11);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            default:
               return var5;
            }
         case 4:
            switch(var4) {
            case 1:
               var6 = new zg(var2.d(), new com.aspose.cells.b.a.b.zo(var2.j(), var2.m()), var0, var1, 1.0F);
               var7 = zn.b(var2);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            case 2:
               var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.j(), var2.m()), var2.d(), var0, var1, 1.0F);
               var7 = zn.b(var2);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            case 3:
               var6 = new zg(var2.d(), new com.aspose.cells.b.a.b.zo(var2.j(), var2.k() + var2.i() / 2.0F), var0, var1, 1.0F);
               var7 = zn.b(new com.aspose.cells.b.a.b.zq(var2.d(), new com.aspose.cells.b.a.b.zt(var2.h(), var2.i() / 2.0F)));
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.j(), var2.m()), new com.aspose.cells.b.a.b.zo(var2.j(), var2.k() + var2.i() / 2.0F), var0, var1, 1.0F);
               var7 = zn.b(new com.aspose.cells.b.a.b.zq(var2.j(), var2.k() + var2.i() / 2.0F, var2.h(), var2.i() / 2.0F));
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               return var5;
            default:
               return var5;
            }
         case 5:
            switch(var4) {
            case 1:
               var6 = new zg(var2.d(), new com.aspose.cells.b.a.b.zo(var2.l(), var2.k()), var0, var1, 1.0F);
               var7 = zn.b(var2);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               break;
            case 2:
               var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.l(), var2.k()), var2.d(), var0, var1, 1.0F);
               var7 = zn.b(var2);
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               break;
            case 3:
               var6 = new zg(var2.d(), new com.aspose.cells.b.a.b.zo(var2.l() - var2.h() / 2.0F, var2.k()), var0, var1, 1.0F);
               var7 = zn.b(new com.aspose.cells.b.a.b.zq(var2.j(), var2.k(), var2.h() / 2.0F, var2.i()));
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
               var6 = new zg(new com.aspose.cells.b.a.b.zo(var2.l(), var2.k()), new com.aspose.cells.b.a.b.zo(var2.l() - var2.h() / 2.0F, var2.k()), var0, var1, 1.0F);
               var7 = zn.b(new com.aspose.cells.b.a.b.zq(var2.j() + var2.h() / 2.0F, var2.k(), var2.h() / 2.0F, var2.i()));
               var7.a((com.aspose.cells.b.a.b.zc)var6);
               com.aspose.cells.b.a.a.ze.a(var5, (Object)var7);
            }
         }

         return var5;
      } else {
         return var5;
      }
   }
}
